﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameEngine;

namespace Daphne.Presenters
{
    public struct TGameBoardPoint
    {
        public double X;
        public double Y;

        public TGameBoardPoint(double x, double y)
        {
            X = x;
            Y = y;
        }
    }
    /// <summary>
    /// Rect for drawing
    /// </summary>
    public struct TGameBoardDrawRect
    {
        public double X;
        public double Y;
        public double Width;
        public double Height;

        public TGameBoardDrawRect(double x, double y, double width, double height)
        {
            X = x;
            Y = y;
            Width = width;
            Height = height;
        }
    }

    /// <summary>
    /// Enum of images drawn
    /// </summary>
    public enum enumDrawnImage { Board, BoardRotated, Board10, WhiteMan, BlackMan, WhiteKing, BlackKing }

    /// <summary>
    /// Delegates for events
    /// </summary>
    public delegate void TStartDraw();
    public delegate void TEndDraw();
    public delegate void TDrawText(double x, double y, string sText, string sColor);
    public delegate void TDrawImage(TGameBoardDrawRect rect, enumDrawnImage drawnImage, int alpha);
    public delegate void TDrawFilledRectangle(TGameBoardDrawRect rect, string sColor, int alpha, int lBoundCurve);
    public delegate void TControlRedraw();
    public delegate void TSetCapture();
    public delegate void TReleaseCapture();
    public delegate void TTimerAction();
    public delegate void TStartTimer(uint miliseconds, TTimerAction action);
    public delegate void TStopTimer();



    /// <summary>
    /// Event for the move done by user
    /// </summary>
    public delegate void TMoveDoneDelegate(Move move);

    /// <summary>
    /// Interface of professional game board to the view
    /// </summary>
    public interface IProfessionalGameBoardView
    {
        void LeftButtonDown(double x, double y);
        void LeftButtonUp(double x, double y);
        void RightButtonUp(double x, double y);
        void MouseMove(double x, double y);

        void DrawBoard();

        event TStartDraw StartDrawEvent;
        event TEndDraw EndDrawEvent;
        event TDrawText DrawTextEvent;
        event TDrawImage DrawImageEvent;
        event TDrawFilledRectangle DrawFilledRectangleEvent;
        event TControlRedraw ControlRedrawEvent;
        event TSetCapture SetCaptureEvent;
        event TReleaseCapture ReleaseCaptureEvent;
        event TStartTimer StartTimerEvent;
        event TStopTimer StopTimerEvent;
    }
}
